// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import Client from '@api/intrusion/api/IasDefenceApi'

import TreeClass from '@api/intrusion/model/DeviceTreeReq'

const CLIENT = CORE.grpcCLIENT(Client)

// ============================== 导出远程接口 ============================== //

export default {
  // —————————————————————————————— 结构树 —————————————————————————————— //

  async getTree(treeParam, TIP = '查询结构树') {
    const DTO = CORE.grpcDTO(TreeClass, treeParam)
    const resp = await CORE.grpc(TIP, CLIENT, 'deviceTree', DTO)
    return resp.listDto || []
  },
}
